#ifndef _SEC_DB_H
#define _SEC_DB_H

typedef struct SectionData
{
	unsigned char	*Data;
	struct SectionData*next;
	struct SectionData*prev;
	unsigned char version;		 
}SECTIONDATA;

typedef int(*SectionCompareProc)(unsigned char*sec1,unsigned char*sec2);

typedef struct
{
	SECTIONDATA*sections;
	SectionCompareProc CmpFun; 
}SECTIONDB, *PSECTIONDB;

extern SECTIONDB*CreateSectionDB(SectionCompareProc fun);

extern void FreeSectionDB(SECTIONDB*secDB);

extern void DestroySectionDB(SECTIONDB*secDB);

extern SECTIONDATA*FindIsSameSectionDB(SECTIONDB*secDB,unsigned char*section);

extern SECTIONDATA*AddSectionToDB(SECTIONDB*secDB,unsigned char*section);

extern unsigned char GetSectionDBVersion(SECTIONDB *db);


#endif
